import Layout from '@/layout'

export const constantRoutes = [
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [{
      path: '/dashboard',
      name: 'Dashboard',
      component: () => import('@/views/Dashboard'),
      meta: { title: '首页', icon: 'dashboard', affix: true }
    }]
  },
  {
    path: '/login',
    component: () => import('@/views/Login/index'),
    hidden: true
  },
  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  }
]
export const menuRoute = {
  path: '/system',
  component: Layout,
  redirect: '/system/menu',
  meta: { title: '菜单管理', icon: 'menu' },
  children: [{
    path: 'menu',
    name: 'menu',
    component: () => import('@/views/System/menu'),
    meta: { title: '菜单管理', icon: 'menu' },
  }],
}
export const errorRoutes = [
  // 404 页面必须放置在最后一个页面
  { path: '*', redirect: '/404', hidden: true },
]
